package com.gongj.bean;

import org.springframework.beans.factory.annotation.Autowired;

public class Person {
	@Autowired
	public User user;

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		System.out.println("setName方法 = " + name);
		this.name = name;
	}

	public Person() {
	}

	public Person(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Person{" +
				"user=" + user +
				", name='" + name + '\'' +
				'}';
	}

	public void destroyMethod(){
		System.out.println("destroy-method");
	}
}
